package ycl.scheduled.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import ycl.scheduled.common.base.entity.BaseEntity;

import java.time.LocalDateTime;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author ycl
 * @since 2022-01-20 00:04:45
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("sys_user")
@ApiModel(value = "SysUser对象", description = "用户表")
public class SysUser extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("用户名")
    @TableField("username")
    private String username;

    @ApiModelProperty("密码")
    @TableField("password")
    private String password;

    @ApiModelProperty("加密盐")
    @TableField("salt")
    private String salt;

    @ApiModelProperty("用户头像")
    @TableField("avatar")
    private String avatar;

    @ApiModelProperty("真实名")
    @TableField("real_name")
    private String realName;

    @ApiModelProperty("身份证")
    @TableField("id_card")
    private String idCard;

    @ApiModelProperty("年龄")
    @TableField("age")
    private Integer age;

    @ApiModelProperty("性别，1男，0女")
    @TableField("sex")
    private Boolean sex;

    @ApiModelProperty("登录信息")
    @TableField("token")
    private String token;

    @ApiModelProperty("邀请码")
    @TableField("invitation_code")
    private String invitationCode;

    @ApiModelProperty("父id，邀请人的id")
    @TableField("parent_id")
    private Long parentId;

    @ApiModelProperty("手机号")
    @TableField("mobile")
    private String mobile;

    @ApiModelProperty("微信id")
    @TableField("wechat_id")
    private String wechatId;

    @ApiModelProperty("状态，0正常，1禁用")
    @TableField("status")
    private Integer status;

    @ApiModelProperty("注册时间")
    @TableField("register_time")
    private LocalDateTime registerTime;

    @ApiModelProperty("是否锁住，锁住不可登录，0否，1是")
    @TableField("locked")
    private Boolean locked;

    @ApiModelProperty("登录地址")
    @TableField("login_ip")
    private String loginIp;

    @ApiModelProperty("登录时间")
    @TableField("login_time")
    private LocalDateTime loginTime;

    @ApiModelProperty("上次登录时间")
    @TableField("last_login_time")
    private LocalDateTime lastLoginTime;

    @ApiModelProperty("上次登录地址")
    @TableField("last_login_ip")
    private String lastLoginIp;

    @ApiModelProperty("退出时间")
    @TableField("logout_time")
    private LocalDateTime logoutTime;
}
